import cookielib
import urllib2
import urllib

def getXHJMsg(content):
    params={"txt":content.encode("UTF-8")}
    cookiejar=cookielib.CookieJar()
    urlopener=urllib2.build_opener(urllib2.HTTPCookieProcessor(cookiejar))
    url="http://www.niurenqushi.com/app/simsimi/ajax.aspx"
    urlopener.addheaders.append(('Referer', 'http://www.niurenqushi.com/app/simsimi/ajax.aspx'))
    urlopener.addheaders.append(('Accept-Language', 'zh-CN'))
    urlopener.addheaders.append(('Host', 'http://www.niurenqushi.com/app/simsimi/'))
    urlopener.addheaders.append(('User-Agent', 'Mozilla/5.0 (compatible; MISE 9.0; Windows NT 6.1); Trident/5.0'))
    urlopener.addheaders.append(('Connection', 'Keep-Alive'))
    urlcontent1=urlopener.open(urllib2.Request(url, urllib.urlencode(params)))
    
    return urlcontent1.read().decode('UTF-8')